#include "TcpServer.hpp"
#include "HttpService.hpp"
void Usage()
{
    std::cout << "Please Enter:\n"
              << "\tseverport";
}

int main(int argc, char *argv[])
{
    
    if (argc != 2)
    {
        Usage();
        exit(-1);
    }
    uint16_t port = std::stoi(argv[1]);
    HttpService hs;
    http_service_t http_service = std::bind(&HttpService::HttpHanderService, &hs, std::placeholders::_1);
    std::unique_ptr<TcpServer> tsvr = std::make_unique<TcpServer>(port, http_service);
    tsvr->start();
    return 0;
}